
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <title><?php echo isset($webname)?$webname:"";?></title>
    <link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>css/member_basic.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>style/member_total.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>css/basic.css" />
<link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>style/index.css" />
<script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/bootstrap.min.js"></script>
    <title>会员中心-<?php echo isset($webname)?$webname:"";?></title>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container-fluid" style="position:relative;">
        <div class="navbar-header nav_header">
            <a href="javascript:void(0);" class="navbar-brand" onclick="history.back();"><span class="glyphicon glyphicon-chevron-left icon"></span></a>
            <a href="javascript:void(0);" class="btn refresh" onclick="window.location.reload();"><span class="glyphicon glyphicon-refresh"></span></a>
        </div>
        <p style="position:absolute; top:15px; left:50%; margin-left:-30px; font-size:16px; text-shadow:2px 2px 3px #ccc;">用户中心</p>
    </div>
</nav>
<div id="main">
    <div class="member_header">
    <div class="container-fluid">
        <div class="row member_bg">
            <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7 pad0">
                <div class="media">
                    <div class="media-left">
                        <img src="<?php echo isset($skin)?$skin:"";?>img/user/head.png" alt="用户头像" class="media-object">
                    </div>
                    <div class="media-body">
                        <h4 class=""><span class="red"><?php echo isset($info->nickname)?$info->nickname:"";?></span> (ID : <span class="red"><?php echo isset($info->usersid)?$info->usersid:"";?></span>)</h4>
                    </div>
                </div>
            </div>
            <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5 info_login pad0">
                <div class="loginout pull-right">
                    <a href="<?php echo url('users/out');?>" class="btn btn-default">退出登陆</a>
                    <a style="display: none" href="member_mysignin.shtml" class="btn btn-default">签到</a>
                </div>
            </div>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row member_bank white_bg">
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 coin-border">
                <p><img src="<?php echo isset($skin)?$skin:"";?>img/user/coin_1.png" alt="乐币"> ¥ <span class="red"><?php echo isset($info->points)?$info->points:"";?></span></p>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                <p><img src="<?php echo isset($skin)?$skin:"";?>img/user/coin_2.png" alt="金币"> 银行 :¥  <span class="red"><?php echo isset($info->bankpoints)?$info->bankpoints:"";?></span></p>
            </div>
        </div>
    </div>
</div>
   
    <div class="container-fluid">
        <div class="row member_ex white_bg member_gift">
            <div class="media">
                <div class="media-left media-middle">
                    <span class="glyphicon glyphicon-calendar"></span>
                </div>
                <div class="media-body">
                    <h4 class="media-heading">密码修改</h4>
                    <p>可修改登陆密码和银行密码</p>
                </div>
            </div>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row white_bg member_mycard">
            <div class="member_pwd">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#login_pass" data-toggle="tab">登陆密码</a></li>
                    <li><a href="#bank_pass" data-toggle="tab">银行密码</a></li>
                </ul>
            </div>
            <div class="tab-content">
                <div class="tab-pane active" id="login_pass">
                    <div class="thumbnail">
                        <form action="">
                            <div class="form-group">
                                <label for="old">原登陆密码:</label>
                                <input type="password" class="form-control" name="oldpass" id="old">
                            </div>
                            <div class="form-group">
                                <label for="new">新登陆密码:</label>
                                <input type="password" class="form-control" name="oldpass" id="new">
                            </div>
                            <div class="form-group">
                                <label for="newt">确认新密码:</label>
                                <input type="password" class="form-control" name="oldpass" id="newt">
                            </div>
                            <button class="btn btn-danger btn-block mod" type="button">马上修改</button>
                        </form>
                    </div>
                </div>
                <div class="tab-pane" id="bank_pass">
                    <div class="thumbnail">
                        <form action="">
                            <div class="form-group">
                                <label for="old">原银行密码:</label>
                                <input type="password" class="form-control" name="oldpass" id="old2">
                            </div>
                            <div class="form-group">
                                <label for="new">新银行密码:</label>
                                <input type="password" class="form-control" name="oldpass" id="new2">
                            </div>
                            <div class="form-group">
                                <label for="newt">确认新密码:</label>
                                <input type="password" class="form-control" name="oldpass" id="newt2">
                            </div>
                            <p></p>
                            <button class="btn btn-danger btn-block mod2">马上修改</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<nav class="navbar-default navbar-fixed-bottom nav_bg">
    <div class="container-fluid nav-li">
        <ul class="nav navbar-nav">
            <li><a href="mobile.php"><span class="glyphicon glyphicon-home"></span> <b>首页</b></a></li>
            <li><a href="<?php echo url('game/index');?>"><span class="glyphicon glyphicon-th-large"></span> <b>游戏乐园</b></a></li>
            <li><a href="<?php echo url('users/index');?>"><span class="glyphicon glyphicon-user"></span> <b>会员</b></a></li>
        </ul>
    </div>
</nav>
<script type="text/javascript">
    $(function () {
        $(".mod").bind('click',function () {
           var old=$("#old").val();
            if(old.length<6){
                alert('原密码必须填,或者小于6位');
                return ;
            }
            var news =$("#new").val();
            if(news.length<6 || news.length>20){
                alert('新密码大于6位,小于20位');
                return ;
            }
            var cnew=$("#newt").val();
            if(news!=cnew){
                alert("两次密码不一致");
                return;
            }
            $.ajax({
                type:'post',
                url:'<?php echo url('users/changePass/n/1');?>',
                data:{t:1,old:old,news:news,cnew:cnew},
            dataType:'json',
                success:function (data) {
                    alert(data.message);
                //if(data.status==0)
                },
            error:function(){
                alert("超时");
            }

            });

        });
        $(".mod2").bind('click',function () {
           var old=$("#old2").val();
            if(old.length<6){
                alert('原密码必须填,或者小于6位');
                return ;
            }
            var news =$("#new2").val();
            if(news.length<6 || news.length>20){
                alert('新密码大于6位,小于20位');
                return ;
            }
            var cnew=$("#newt2").val();
            if(news!=cnew){
                alert("两次密码不一致");
                return;
            }
            $.ajax({
                type:'post',
                url:'<?php echo url('users/changePass/n/1');?>',
                data:{old:old,news:news,cnew:cnew},
                dataType:'json',
                success:function (data) {
                    alert(data.message);
                //if(data.status==0)
                },
            error:function(){
                alert("超时");
            }

            });

        });

    });
</script>
</body>
</html>